package com.example.springblog.mapper;

import com.example.springblog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    @Select("select id,user_name,password,github_url,delete_flag,create_time,update_time from user where user_name=#{name} and delete_flag=0")
    UserInfo queryByName(String name);

    @Select("select id,user_name,password,github_url,delete_flag,create_time,update_time from user where id=#{id} and delete_flag=0")
    UserInfo queryById(Integer id);

}
